package gam.t1.appraisal2.dinv;

import gam.t1.appraisal2.DIConfig;
import gam.t1.appraisal2.Data;
import org.bukkit.ChatColor;
import org.bukkit.configuration.file.YamlConfiguration;
import org.bukkit.plugin.Plugin;

import java.io.File;

public class AppraisalMsg extends DIConfig {
    public static String AP_SUCCESS;
    public static String AP_FAIL;
    public AppraisalMsg(Plugin plugin, String filePath) {
        super(plugin, filePath);
    }

    private String a(String b){return ChatColor.translateAlternateColorCodes('&',b);}
    @Override
    protected void load() {
        File var1 = new File(plugin.getDataFolder(),filePath);
        if (!var1.exists()){
            var1.getParentFile().mkdirs();
            plugin.saveResource(filePath, false);
        }
        YamlConfiguration var2 = YamlConfiguration.loadConfiguration(var1);
        AP_SUCCESS = a(var2.getString("appraisal.exchange.successfully"));
        AP_FAIL = a(var2.getString("appraisal.exchange.noenoughitem"));
    }
}
